#pragma once
#include "threadtask.h"
USING_LIBSPACE

class CEventRunner //: ThreadTask
{
public:
	typedef std::string Key;

	CEventRunner(void);
	virtual ~CEventRunner(void);
	
public:
	bool EnQueueEvent( IEvent& theevent )
	{
		m_events.enqueue(theevent);
	}
	virtual bool Run()
	{
		while(true)
		{
			try
			{
				IEvent theevent = m_events.dequeue();
			}
			catch(...)
			{
			}
		}
	}
protected:
	blockabledqueue<IEvent> m_events;
};
